-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setup dependencies that match the GCC ABI of the compiler #604
Conversation
f41b19c
to
34a2b92
Compare
34a2b92
to
df8a206
Compare
df8a206
to
3fb4dc5
Compare
70abda3
to
68a43fd
Compare
shards = choose_shards(platform; extract_kwargs(kwargs, (:preferred_gcc_version,:preferred_llvm_version,:bootstrap_list,:compilers))...) | ||
if isnothing(shards) | ||
# Choose the shards we're going to mount | ||
shards = choose_shards(platform; extract_kwargs(kwargs, (:preferred_gcc_version,:preferred_llvm_version,:bootstrap_list,:compilers))...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move this into the kwarg
initialization above? I'd rather avoid the "default value of nothing
means initialize it halfway through the method" pattern if we can, and I don't think there's a hidden reason why choose_shards()
must be run after the stuff above it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't know kwargs
when we initialise shards
, do we?
if isnothing(shards) | ||
# Choose the shards we're going to mount | ||
shards = choose_shards(platform; extract_kwargs(kwargs, (:preferred_gcc_version,:preferred_llvm_version,:bootstrap_list,:compilers))...) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here; let's try moving this initialization into the kwargs specification above.
LLVMBuild(v"7.1.0"), | ||
LLVMBuild(v"8.0.1"), | ||
LLVMBuild(v"9.0.1")] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see us eventually adding Rust
, Go
, etc... things here. Nice.
One thing come out in JuliaPackaging/Yggdrasil#293 that is slightly relevant for the issue this PR is meant to solve. In BinaryBuilder.jl/src/Runner.jl Lines 311 to 312 in f4ba291
unique makes sure that we don't write things twice, but this actually happens: host_platform is usually Linux(:x86_64, libc=:musl) , but if the target has a non-nothing compiler ABI specification then the wrappers are written twice, with the ones for the host (always ABI-agonistic) overwriting the one for the target. In the particular case the non-nothing ABI is the C++ string one, this means that the wrappers with the setting of _GLIBCXX_USE_CXX11_ABI are lost.
Possible solutions I came up with:
What do you think? |
I went ahead and implemented a mixture of my proposed solutions: let the target wrappers override the host wrappers, but also error out in case we're asking for incompatible ABI. The error situations should never happen in practice as the |
033bd85
to
f6bcbb4
Compare
f6bcbb4
to
18a40fb
Compare
Yes, I agree that this is the best solution. |
This should solve the issue we had in JuliaPackaging/Yggdrasil#369 where the build environment had libgfortran3, but a dependency (namely OpenBLAS) was downloaded in its libgfortran5 flavour.
I tested this PR locally with JuliaPackaging/Yggdrasil#378.